<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>用户注册</title>
    <script>
        ; (function (designWidth, maxWidth) {
            var doc = document,
                win = window,
                docEl = doc.documentElement,
                remStyle = document.createElement("style"),
                tid;

            function refreshRem() {
                var width = docEl.getBoundingClientRect().width;
                maxWidth = maxWidth || 540;
                width > maxWidth && (width = maxWidth);
                var rem = width * 100 / designWidth;
                remStyle.innerHTML = 'html{font-size:' + rem + 'px;}';
            }

            if (docEl.firstElementChild) {
                docEl.firstElementChild.appendChild(remStyle);
            } else {
                var wrap = doc.createElement("div");
                wrap.appendChild(remStyle);
                doc.write(wrap.innerHTML);
                wrap = null;
            }
            //要等 wiewport 设置好后才能执行 refreshRem，不然 refreshRem 会执行2次；
            refreshRem();

            win.addEventListener("resize", function () {
                clearTimeout(tid); //防止执行两次
                tid = setTimeout(refreshRem, 300);
            }, false);

            win.addEventListener("pageshow", function (e) {
                if (e.persisted) { // 浏览器后退的时候重新计算
                    clearTimeout(tid);
                    tid = setTimeout(refreshRem, 300);
                }
            }, false);

            if (doc.readyState === "complete") {
                doc.body.style.fontSize = "16px";
            } else {
                doc.addEventListener("DOMContentLoaded", function (e) {
                    doc.body.style.fontSize = "16px";
                }, false);
            }
        })(828, 828);
    </script>
    <link rel="stylesheet" href="./css/common.css">
</head>

<body>
    <div class="wrap register">
        <!-- logo -->
        <h1>
            <img src="./imgs/logo.png" class="logo-img" alt="">
        </h1>
        <!-- 登录框 -->
        <div class="login-box">
            <form action="">
                <img src="./imgs/dengl.png" class="avatar" alt="">
                <div class="login-text">用户注册</div>
                <div class="cell input-wrap">
                    <img src="./imgs/xinm.png" class="input-icon" alt="">
                    <input type="text" placeholder="姓名">
                </div>
                <div class="password input-wrap">
                    <img src="./imgs/dlmm.png" class="input-icon" alt="">
                    <input type="password" placeholder="登录密码">
                </div>
                <div class="password input-wrap">
                    <img src="./imgs/qrmm.png" class="input-icon" alt="">
                    <input type="password" placeholder="确认密码">
                </div>
                <div class="password input-wrap">
                    <img src="./imgs/sjh.png" class="input-icon" alt="">
                    <input type="text" placeholder="手机号">
                </div>
                <div class="password input-wrap">
                    <img src="./imgs/yzm.png" class="input-icon" alt="">
                    <input type="text" name="code" placeholder="验证码"><div class="code">获取验证码</div>
                </div>
                <div class="login-btn input-wrap">立即注册</div>
            </form>
        </div>
        <div class="footer">已有账号，去登录</div>
    </div>
</body>

</html>